import request from '../request'

// ----------------------------------------------【个人中心】----------------------------------------------------

//【】获取图片验证码
// export const getCodeImage = (data) => { return request({ url: '/getCodeImage', method: 'get', data , modules:'auth' }) }
// //【】校验验证码
// export const checkCode = (data) => { return request({ url: '/checkCode', method: 'post', data , modules:'auth' }) }

//【】获取图片验证码
export const getCodeImage = (data) => { return request({ url: '/getCodeImage', method: 'get', data , modules:'system' }) }
//【】校验验证码
export const checkCode = (data) => { return request({ url: '/checkCode', method: 'post', data , modules:'system' }) }

// 首页控制台相关接口
export const getServerInfo = (data) => { return request({ url: '/serverInfo/getServerInfo', method: 'post', data }) }
// mainBoradMall
export const getMainBoradMall = (data) => { return request({ url: '/mainBoradMall/getMainBoradMall', method: 'post', data }) }
// mainBoradMall
export const getLatestOrderAmount = (data) => { return request({ url: '/mainBoradMall/getLatestOrderAmount', method: 'post', data }) }


//上传文件
export function uploadFile(data , onUploadProgress ) { return request({ url: '/system/common/upload', method: 'post', data  ,onUploadProgress   })}
// export function uploadFile(data , onUploadProgress ) { return request({ url: '/upload', method: 'post', data  ,onUploadProgress   })}
//下载文件
export function downLoad(data , onUploadProgress ) { return request({ url: '/downLoad', method: 'post', data  ,onUploadProgress   })}




// ----------------------------------------------【代码生成器】----------------------------------------------------

// 获取所有数据库表列表
export const getTableList = (params) => { return request({ url: '/sysCodeMaker/getTableList', method: 'get', params }) }
// 根据表名获取表字段列表
export function getColumnList(params) { return request({ url: '/sysCodeMaker/getColumnList', method: 'get', params: params }) }
// 预览业务代码
export function doPreview(data) { return request({ url: '/sysCodeMaker/preview', method: 'post', data }) }
// 生成业务代码
export function doBuild(data) { return request({ url: '/sysCodeMaker/dobuild', method: 'post', params: data }) }

